import QtQuick 2.0
import "../../js/UI.js" as Style

Rectangle {
    id: m_button

    property alias m_image: m_iamge
    property alias m_text: m_text
    property alias m_font: m_text.font.pointSize
    property alias m_text_color: m_text.color
    property alias mouse_enble: m_mouseArea.enabled;
    property alias m_mouseArea: m_mouseArea
    property alias m_mouseArea_enabled: m_mouseArea.enabled
    signal sigClick
    color: "transparent"
    width: Math.max(m_lineValue, m_text.paintedWidth)
    height: m_lineValue

    Image {
        id: m_iamge
        sourceSize.width: m_lineValue*0.6
        sourceSize.height: m_lineValue*0.6
        anchors.centerIn: parent
    }

    AText {
        id: m_text
        anchors.centerIn: parent
        color: m_mouseArea.pressed ?  "grey" : Style.titlePontColor
        font.pointSize: 16
    }
    MouseArea {
        id: m_mouseArea
        anchors.fill: parent
        onClicked: sigClick()
    }
}


